﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WPFIPodControls"
    >
    <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="HorizontalScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid Background="Transparent">
                        <Border
                Height="8"
                Background="#747474"
                BorderThickness="0.5,1"
                CornerRadius="3"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="VerticalScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid Background="Transparent">
                        <Border
                Width="8"
                Background="#747474"
                BorderThickness="1,0.5"
                CornerRadius="3"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid Width="8">
            <Border Width="8" Background="Transparent" CornerRadius="3"/>
            <Track Name="PART_Track" IsDirectionReversed="true">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb x:Name="Thumb" Opacity="0.25" Style="{StaticResource VerticalScrollBarThumb}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.IncreaseRepeatButton>
            </Track>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                  Duration="0:0:0.25"
                  Storyboard.TargetName="Thumb"
                  Storyboard.TargetProperty="Opacity"
                  To="1"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0.25" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid Height="8">
            <Border Height="8" Background="#18000000" CornerRadius="3"/>
            <Track Name="PART_Track" IsDirectionReversed="false">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb x:Name="Thumb" Opacity="0.25" Style="{StaticResource HorizontalScrollBarThumb}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}"/>
                </Track.IncreaseRepeatButton>
            </Track>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                  Duration="0:0:0.25"
                  Storyboard.TargetName="Thumb"
                  Storyboard.TargetProperty="Opacity"
                  To="1"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0.25" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Template" Value="{StaticResource VerticalScrollBar}"/>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ipodscrollviewer" TargetType="{x:Type ScrollViewer}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid x:Name="Grid" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                                
                Margin="0,0,0,0"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"/>
                        <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Column="1"
                Grid.Row="0"
                Margin="0,1,0,1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DrawingBrush x:Key="backgroundListBrush" Viewport="2,2,7,7"  ViewportUnits="Absolute" TileMode="Tile">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <GeometryDrawing>
                    <GeometryDrawing.Geometry>
                        <GeometryGroup>
                            <LineGeometry StartPoint="0,0" EndPoint="0,100"/>
                        </GeometryGroup>
                    </GeometryDrawing.Geometry>
                    <GeometryDrawing.Pen>
                        <Pen Thickness="3">
                            <Pen.Brush>
                                <LinearGradientBrush>
                                    <GradientStop Offset="0.0" Color="#CCD3DD" />
                                    <GradientStop Offset="1.0" Color="#CDD2D8" />
                                </LinearGradientBrush>
                            </Pen.Brush>
                        </Pen>
                    </GeometryDrawing.Pen>
                </GeometryDrawing>
                <GeometryDrawing>
                    <GeometryDrawing.Geometry>
                        <GeometryGroup>
                            <LineGeometry StartPoint="2,0" EndPoint="2,100"/>
                        </GeometryGroup>
                    </GeometryDrawing.Geometry>
                    <GeometryDrawing.Pen>
                        <Pen Thickness="4">
                            <Pen.Brush>
                                <LinearGradientBrush>
                                    <GradientStop Offset="0.0" Color="#C5CCD6" />
                                    <GradientStop Offset="1.0" Color="#C6CBD1" />
                                </LinearGradientBrush>
                            </Pen.Brush>
                        </Pen>
                    </GeometryDrawing.Pen>
                </GeometryDrawing>
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>
    <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="0,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd" Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Padding="{TemplateBinding Padding}" 
                                SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="Bd" Property="Background" >
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Color="#058CF5" Offset="0"/>
                                        <GradientStop Color="#0060E5" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Value="{x:Static SystemColors.HighlightTextBrush}" Property="Foreground" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="Selector.IsSelectionActive" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Value="{x:Static SystemColors.ControlBrush}" Property="Background" />
                            <Setter Value="{x:Static SystemColors.ControlTextBrush}" Property="Foreground" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Value="{x:Static SystemColors.GrayTextBrush}" Property="Foreground" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <local:IndexToVisibilityConverter x:Key="IndexToVisibilityConverter"/>
    <Style x:Key="lbi1" TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="0,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <Border Name="Bd" Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Padding="{TemplateBinding Padding}" 
                                SnapsToDevicePixels="true">
                        <DockPanel>
                            <ContentPresenter DockPanel.Dock="Top" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <Grid Background="#E1E1E1" Height="1" DockPanel.Dock="Top">
                                <!--<Grid.Visibility>
                                    <MultiBinding Converter="{StaticResource PositionToVisibilityConverter}">
                                        <Binding Path="." />
                                        <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}" Path="." />
                                    </MultiBinding>
                                </Grid.Visibility>-->
                            </Grid>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="Bd" Property="Background" >
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Color="#058CF5" Offset="0"/>
                                        <GradientStop Color="#0060E5" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Value="{x:Static SystemColors.HighlightTextBrush}" Property="Foreground" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="Selector.IsSelectionActive" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Value="{x:Static SystemColors.ControlBrush}" Property="Background" />
                            <Setter Value="{x:Static SystemColors.ControlTextBrush}" Property="Foreground" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Value="{x:Static SystemColors.GrayTextBrush}" Property="Foreground" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type local:IPodListBox}" TargetType="{x:Type local:IPodListBox}">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:IPodListBox}">
                    <ControlTemplate.Resources>
                        <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
                            <Setter Property="Background" Value="Transparent" />
                            <Setter Property="Padding" Value="0,0,0,0" />
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                        <Border Name="Bd" Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Padding="{TemplateBinding Padding}" 
                                SnapsToDevicePixels="true">
                                            <DockPanel>
                                                <ContentPresenter Margin="5" DockPanel.Dock="Top" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                                <Grid Background="#E1E1E1" Height="1" DockPanel.Dock="Top">
                                                    <Grid.Visibility>
                                                        <MultiBinding Converter="{StaticResource IndexToVisibilityConverter}">
                                                            <Binding Path="."/>
                                                            <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}" Path="." />
                                                        </MultiBinding>
                                                    </Grid.Visibility>
                                                </Grid>
                                            </DockPanel>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsSelected" Value="true">
                                                <Setter TargetName="Bd" Property="Background" >
                                                    <Setter.Value>
                                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                            <GradientStop Color="#058CF5" Offset="0"/>
                                                            <GradientStop Color="#0060E5" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Value="{x:Static SystemColors.HighlightTextBrush}" Property="Foreground" />
                                            </Trigger>
                                            <MultiTrigger>
                                                <MultiTrigger.Conditions>
                                                    <Condition Property="IsSelected" Value="true" />
                                                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                                                </MultiTrigger.Conditions>
                                                <Setter TargetName="Bd" Value="{x:Static SystemColors.ControlBrush}" Property="Background" />
                                                <Setter Value="{x:Static SystemColors.ControlTextBrush}" Property="Foreground" />
                                            </MultiTrigger>
                                            <Trigger Property="IsEnabled" Value="false">
                                                <Setter Value="{x:Static SystemColors.GrayTextBrush}" Property="Foreground" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </ControlTemplate.Resources>
                    <ScrollViewer HorizontalScrollBarVisibility="Auto"  
          Background="{StaticResource backgroundListBrush}" Style="{StaticResource ipodscrollviewer}">
                        <Border  CornerRadius="5" Margin="5,10,1,10" BorderBrush="#AAABAF" BorderThickness="1" Background="White" VerticalAlignment="Top">
                            <ItemsPresenter />
                        </Border>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <ControlTemplate.Resources>
                    </ControlTemplate.Resources>
                    <ScrollViewer HorizontalScrollBarVisibility="Auto"  
          Background="{StaticResource backgroundListBrush}" Style="{StaticResource ipodscrollviewer}">
                        <Border  CornerRadius="5" Margin="5,10,1,10" BorderBrush="#AAABAF" BorderThickness="1" Background="White">
                            <ItemsPresenter />
                        </Border>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- check box -->
    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
    <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
    <!-- Border Brushes -->
    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />

    <!-- Miscellaneous Brushes -->

    <Style x:Key="CheckBoxFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <!-- original dimension width="94" height="27"-->
                        <Rectangle  Height="15.90" Width="55.35" HorizontalAlignment="Left" VerticalAlignment="Top"
            Margin="0,0,0,0"
            StrokeThickness="2"
            Stroke="#60000000"
            StrokeDashArray="1 2"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- button brushes -->
    <LinearGradientBrush x:Key="buttonNormalBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#F0F0F0" Offset="0"/>
        <GradientStop Color="#CDCDCD" Offset="0.1"/>
        <GradientStop Color="#FBFBFB" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="buttonPressedBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#F0F0F0" Offset="0"/>
        <GradientStop Color="#B5B5B5" Offset="0.1"/>
        <GradientStop Color="#DDDDDD" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="buttonMouseOverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#F0F0F0" Offset="0"/>
        <GradientStop Color="#C0C0C0" Offset="0.1"/>
        <GradientStop Color="#EBEBEB" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="buttonBorderBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#919191" Offset="0"/>
        <GradientStop Color="#979797" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="buttonPressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#444" Offset="0.0"/>
        <GradientStop Color="#888" Offset="1.0"/>
    </LinearGradientBrush>


    <!-- background -->
    <LinearGradientBrush x:Key="CheckedBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#335AA9" Offset="0"/>
        <GradientStop Color="#77AEFE" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="UnCheckedBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#B6B6B6" Offset="0"/>
        <GradientStop Color="#FEFEFE" Offset="0.8"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="MixedCheckedBrush" StartPoint="0,0" EndPoint="1,1">
        <GradientStop Color="#335AA9" Offset="0"/>
        <GradientStop Color="#77AEFE" Offset="0.3"/>
        <GradientStop Color="#B6B6B6" Offset="0.7"/>
        <GradientStop Color="#FEFEFE" Offset="1"/>
    </LinearGradientBrush>

    <!-- background border -->
    <LinearGradientBrush x:Key="backBorderBrushUnchecked" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#7D7D7D" Offset="0"/>
        <GradientStop Color="#BFBFBF" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="backBorderBrushChecked" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#17366C" Offset="0"/>
        <GradientStop Color="#5E86C3" Offset="1"/>
    </LinearGradientBrush>


    <Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Width" Value="55.35"/>
        <Setter Property="Height" Value="15.90"/>
        <Setter Property="FocusVisualStyle"    Value="{StaticResource CheckBoxFocusVisual}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <BulletDecorator Background="Transparent">
                        <BulletDecorator.Bullet>
                            <!-- original dimension width="94" height="27"-->
                            <Border x:Name="backBorder" Width="55.35" Height="15.90" 
                                        BorderBrush="{StaticResource backBorderBrushUnchecked}" 
                                        BorderThickness="1" CornerRadius="3" Background="{StaticResource UnCheckedBrush}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                    >
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <!-- off indicator original dimension width and height="16"-->
                                    <Ellipse Width="9.4224" Height="9.4224" Stroke="#7D7D7D" StrokeThickness="1"  Grid.Column="1" Margin="0,0,5,0"/>

                                    <!-- on indicator original dimension height="16"-->
                                    <Rectangle Width="4" Height="9.4224" Margin="5,1,0,0">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="#E3FFFF" Offset="0"/>
                                                <GradientStop Color="#E6FFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="#3157AA" Offset="0"/>
                                                <GradientStop Color="#78A4E5" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <!-- for disabled state-->
                                    <Rectangle x:Name="opacityRect" Fill="White" Grid.ColumnSpan="2" RadiusX="3" RadiusY="3" Opacity="0.6" Visibility="Collapsed" Margin="-1,-1,-1,-1"/>
                                    <!-- foreground button original dimension width=41-->
                                    <Border x:Name="Border" HorizontalAlignment="Left" Grid.ColumnSpan="2"
                Width="24.1449"
                Margin="-1,-1,-1,-1"
                CornerRadius="3" 
                Background="{StaticResource buttonNormalBrush}"
                BorderThickness="1"
                BorderBrush="{StaticResource buttonBorderBrush}">
                                    </Border>
                                </Grid>
                            </Border>
                        </BulletDecorator.Bullet>
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="Border" Property="HorizontalAlignment" Value="Left"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="Border" Property="HorizontalAlignment" Value="Right"/>
                            <Setter TargetName="backBorder" Property="Background" Value="{StaticResource CheckedBrush}"/>
                            <Setter TargetName="backBorder" Property="BorderBrush" Value="{StaticResource backBorderBrushChecked}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="Border" Property="HorizontalAlignment" Value="Center"/>
                            <Setter TargetName="backBorder" Property="Background" Value="{StaticResource MixedCheckedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource buttonMouseOverBrush}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource buttonPressedBrush}" />

                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource buttonPressedBorderBrush}" />

                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                            <Setter TargetName="opacityRect" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <DrawingBrush x:Key="moredetailsBrush">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <GeometryDrawing>
                    <GeometryDrawing.Brush>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Color="#DEDFE1" Offset="0"/>
                            <GradientStop Color="#A3A3A3" Offset="1"/>
                        </LinearGradientBrush>
                    </GeometryDrawing.Brush>
                    <GeometryDrawing.Geometry>
                        <EllipseGeometry RadiusX="27" RadiusY="27"></EllipseGeometry>
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                        <EllipseGeometry RadiusX="23" RadiusY="23"></EllipseGeometry>
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing>
                    <GeometryDrawing.Brush>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Color="#79A6E1" Offset="0"/>
                            <GradientStop Color="#3F6DA9" Offset="1"/>
                        </LinearGradientBrush>
                    </GeometryDrawing.Brush>
                    <GeometryDrawing.Geometry>
                        <CombinedGeometry GeometryCombineMode="Exclude">
                            <CombinedGeometry.Geometry1>
                                <EllipseGeometry RadiusX="19" RadiusY="19"></EllipseGeometry>
                            </CombinedGeometry.Geometry1>
                            <CombinedGeometry.Geometry2>
                                <GeometryGroup>
                                    <GeometryGroup.Transform>
                                        <TransformGroup>
                                            <RotateTransform Angle="135"/>
                                            <TranslateTransform X="8" />
                                        </TransformGroup>
                                    </GeometryGroup.Transform>
                                    <RectangleGeometry Rect="0,0,4,15" RadiusX="0" RadiusY="0"></RectangleGeometry>
                                    <RectangleGeometry Rect="4,0,11,4" RadiusX="0" RadiusY="0"></RectangleGeometry>
                                </GeometryGroup>
                            </CombinedGeometry.Geometry2>
                        </CombinedGeometry>
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>
    
    <!-- button style -->
    <Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
        <Setter Property="Padding" Value="2" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" >
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#93A4BE" Offset="0"/>
                    <GradientStop Color="#4F6B93" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#283848" Offset="0"/>
                    <GradientStop Color="#384F79" Offset="0"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        
        <Setter Property="Foreground" Value="#DFECFD">
            
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="BorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Color="#000060" Offset="0" />
                                        <GradientStop Color="#000080" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Color="#000060" Offset="0" />
                                        <GradientStop Color="#000080" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Value="{x:Static SystemColors.GrayTextBrush}" Property="Foreground" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" CornerRadius="3">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>
</ResourceDictionary>
